<template>
  <div>
    <!-- 1.Vue3框架默认会自动传入event对象, 可以在方法中获取 -->
    <button @click="btn1Click">自动传入event对象</button>
    <!-- 2.手动传入event对象：$event是事件发生时的事件对象，固定$event语法 -->
    <button @click="btn2Click($event, 'aaa', 18)">手动传入event对象</button>
  </div>
</template>

<script>
export default {
  name: 'page-day8',
  methods: {
    btn1Click(event) {
      console.log(event)
    },
    btn2Click(event, name, age) {
      console.log(event, name, age)
    }
  }
}
</script>

<style lang="scss" scoped></style>
